#pragma once

#include "Type.h"
#include "yyjson.h"

namespace Finviz
{
    template <typename T>
    std::vector<T> get_item_data(yyjson_val *arr)
    {
        std::vector<T> data;
        yyjson_val *val;
        yyjson_arr_iter iter = yyjson_arr_iter_with(arr);
        while ((val = yyjson_arr_iter_next(&iter)))
        {
            data.push_back(yyjson_get_num(val));
        }
        return data;
    }
    CandlestickChartData CandlestickChartAnalyze(yyjson_val *root);
}
